// import { deptList } from "@/servers/api/sysDeptController";
import { dgFindChildrenTreeData } from "@/utils";
import { useEffect, useState } from "react";

const useDept = () => {
    const [deptData, setDeptData] = useState<Array<API.bumenshitilei>>([]);

    // async function getTreeData() {
    //     const { data } = await deptList({ deptName: '', orderNum: 0 });
    //     setDeptData(dgFindChildrenTreeData(data));
    // }

    useEffect(() => {
        console.log(111);
        // getTreeData()
    }, [])

    return {
        deptData
    };
}
export default useDept;
